<?php
/**
 * 地铁
 */

namespace app\api\controller;

use app\api\model\Metro as MetroModel;
use app\common\controller\ApiController;
use think\Exception;

class Metro extends ApiController {

//    protected $notNeedToken = ['getlist'];

    protected $notNeedPhone = ['getlist'];

    protected $isArrayResult = ['getlist'];

    /**
     * 地图找房-地铁
     * @return false|string
     */
    public function getList() {
        try {
            $params = $this->checkParams('');
            if ($params === false) {
                return $this->resErr();
            }
            $data = MetroModel::getList($params);
            return $this->resData('success', $data);
        } catch (Exception $e) {
            return $this->resErr($e->getMessage(), $e->getCode());
        }
    }

}
